﻿<!DOCTYPE HTML>
<!-- saved from url=(0070)http://172.13.19.31:6060/note_html/数据库/SQL/104013-SQL-数字函数.html -->
<!DOCTYPE html PUBLIC "" ""><HTML><HEAD><META content="IE=11.0000" 
http-equiv="X-UA-Compatible">
 
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<TITLE>SQL-数字函数</TITLE> <LINK href="SQL-数字函数_files/standalone.css" rel="stylesheet"> 
<LINK href="SQL-数字函数_files/overlay-apple.css" rel="stylesheet"> <LINK href="SQL-数字函数_files/article_edit.css" 
rel="stylesheet"> 
<STYLE type="text/css">
	#content{
		margin: 5px 10px;
	}
</STYLE>
	 <!-- 代码高亮 -->	 <LINK href="SQL-数字函数_files/shCoreEclipse.css" rel="stylesheet">
	 <LINK href="SQL-数字函数_files/my-highlighter.css" rel="stylesheet"> 
<META name="GENERATOR" content="MSHTML 11.00.10586.545"></HEAD> 
<BODY>
<DIV id="content">
<H1 align="center">SQL-数字函数</H1>
<P align="right" 
style="margin: 0px 10px 0px 0px; padding: 0px;">最后修改时间：2016-06-15 13:21:14</P>
<HR style="border-width: 2px; border-color: lime;">

<H3>数字函数</H3>
<TABLE>
  <THEAD>
  <TR>
    <TD>函数</TD>
    <TD>说明</TD>
    <TD>示例</TD></TR></THEAD>
  <TBODY>
  <TR>
    <TD>ABS(x)</TD>
    <TD>x绝对值</TD>
    <TD>ABS(-3)=3</TD></TR>
  <TR>
    <TD>ACOS(x)</TD>
    <TD>x的反余弦</TD>
    <TD>ACOS(1)=0</TD></TR>
  <TR>
    <TD>COS(x)</TD>
    <TD>余弦</TD>
    <TD>COS(1)=1.57079633</TD></TR>
  <TR>
    <TD>CEIL(x)</TD>
    <TD>大于或等于x的最小值</TD>
    <TD>CEIL(5.4)=6</TD></TR>
  <TR>
    <TD>FLOOR(x)</TD>
    <TD>小于或等于x的最大值</TD>
    <TD>FLOOR(5.8)=5</TD></TR>
  <TR>
    <TD>LOG(x,y)</TD>
    <TD>x为底y的对数</TD>
    <TD>LOG(2,4)=2</TD></TR>
  <TR>
    <TD>MOD(x,y)</TD>
    <TD>x除以y的余数</TD>
    <TD>MOD(8,3)=2</TD></TR>
  <TR>
    <TD>POWER(x,y)</TD>
    <TD>x的y次幂</TD>
    <TD>POWER(2,3)=8</TD></TR>
  <TR>
    <TD>ROUND(x[,y])</TD>
    <TD>x在第y位四舍五入</TD>
    <TD>ROUND(3.456,2)=3.46</TD></TR>
  <TR>
    <TD>SQRT(x)</TD>
    <TD>x的平方根</TD>
    <TD>SQRT(4)=2</TD></TR>
  <TR>
    <TD>TRUNC(x[,y])</TD>
    <TD>x在第y位截断</TD>
    <TD>TRUNC(3.456,2)=3.45</TD></TR></TBODY></TABLE>
<HR style="border-width: 2px; border-color: lime;">

<DIV align="center">©copyright 版权所有   作者：zzy</DIV>
<TABLE>
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shCore.js" type="text/javascript"></SCRIPT>
   
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushJava.js" type="text/javascript"></SCRIPT>
  	
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushJScript.js" type="text/javascript"></SCRIPT>
   
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushXml.js" type="text/javascript"></SCRIPT>
   
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushSql.js" type="text/javascript"></SCRIPT>
   
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushBash.js" type="text/javascript"></SCRIPT>
  	
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushVb.js" type="text/javascript"></SCRIPT>
  	
<SCRIPT src="../../pub/syntaxhighlighter/scripts/shBrushCss.js" type="text/javascript"></SCRIPT>
  	
<SCRIPT src="../../pub/syntaxhighlighter/init.js" type="text/javascript"></SCRIPT>
   
<SCRIPT src="../../pub/js/jquery.tools.min.js" type="text/javascript"></SCRIPT>
   <!-- make all links with the 'rel' attribute open overlays --> 
<SCRIPT>
  $(function() {
      $("#apple img[rel]").overlay({effect: 'apple'});
    });
</SCRIPT>
   </DIV></BODY></HTML>
